import { IPSChartCoordinateSystemRadar } from './ipschart-coordinate-system-radar';
import { IPSChartRadar } from './ipschart-radar';
import { PSDEChartCoordinateSystemImplBase } from './psdechart-coordinate-system-impl-base';

export class PSDEChartCoordinateSystemRadarImpl extends PSDEChartCoordinateSystemImplBase implements IPSChartCoordinateSystemRadar {
  protected pschartradar: IPSChartRadar | null = null;

  getPSChartRadar(): IPSChartRadar | null {
    if (this.pschartradar != null) return this.pschartradar;
    const value = this.M.getPSChartRadar;
    if (value == null) {
      return null;
    }
    this.pschartradar = this.getPSModel4('control.chart.IPSChartRadar', value, 'getPSChartRadar') as IPSChartRadar;
    return this.pschartradar;
  }

  get psChartRadar(): IPSChartRadar | null {
    return this.getPSChartRadar();
  }

  getPSChartRadarMust(): IPSChartRadar {
    const value = this.getPSChartRadar();
    if (value == null) {
      throw new Error('未指定图表雷达部件');
    }
    return value;
  }

  get cls(): string {
    return 'PSDEChartCoordinateSystemRadarImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.chart.IPSChartCoordinateSystemRadar') return true;
    return super.instanceof(cls);
  }
}
